using Microsoft.AspNetCore.Mvc.RazorPages;

namespace Unified.payment.code.Pages
{
    public class SmartPayModel : PageModel
    {
        public string WechatPayUrl { get; set; } = "";
        public string AlipayUrl { get; set; } = "";

        public void OnGet(string wechat, string alipay)
        {
            // 解码URL参数
            if (!string.IsNullOrEmpty(wechat))
            {
                WechatPayUrl = Uri.UnescapeDataString(wechat);
            }
            
            if (!string.IsNullOrEmpty(alipay))
            {
                AlipayUrl = Uri.UnescapeDataString(alipay);
            }
        }
    }
}